#ifndef Kernel_MSolver_h
#define Kernel_MSolver_h

#include "KernelModule.h"
#include "Utility/Configuration/SGParameter.h"

namespace Kernel
{
    // Forward declarations
    class MModel;

    /**
     * \addtogroup Kernel
     * @{
     */

    /**
     * @brief Base class to define the interfaces of the solving algorithm.
     *
     * @author nene
     * @date November, 2024.
     *
     */
    class KERNEL_EXPORT MSolver
    {
    public:
      explicit MSolver (MModel &model, const SG::Utility::SGParameter& parameter);
      virtual ~MSolver ();

      ///
      virtual void Initialize ();

      /**
       * Define the skeleton of an algorithm in an operation, deferring some steps to
       * subclasses. Template Method lets subclasses redefine certain steps of an
       * algorithm without changing the algorithm's structure.
       */
      virtual void Solve ();

      ///
      virtual void Finalize ();

    protected:
      MModel *myModel = nullptr;
      const SG::Utility::SGParameter& myParameter;
    };

    /** @}*/

}  // namespace Kernel

#endif  // Kernel_MSolver_h